package com.cnpc.iot.dform.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.cnpc.framework.query.entity.QueryCondition;

/**
 * 动态表单服务
 * @author yuying
 *
 */
public interface DformService {

	/**
	 * 建表语句
	 * @param queryCondition
	 * @param nodeCode
	 * @return
	 */
	public Map<String, Object> createDform(QueryCondition queryCondition, String nodeId);
	
	/**
	 * 查询语句
	 * @param nodeId
	 * @return
	 */
	public List<Map<String,Object>> querySql(String nodeId);
	
	/**
	 * 删除语句
	 * @param nodeId
	 * @param id
	 * @return
	 */
	public int deleteSql(String nodeId, String id);
	
	/**
	 * 插入语句
	 * @param nodeId
	 * @param parame
	 * @return
	 */
	public int insertSql(String nodeId, String parent, String fileids, Map<String,Object> parame);
	
	/**
	 * 修改语句
	 * @param nodeId
	 * @param id
	 * @param parame
	 * @return
	 */
	public int updateSql(String nodeId,String id, Map<String,Object> parame);
	
	/**
	 * 生成编辑页面元素
	 * @param request
	 * @param parent
	 * @param node
	 */
	public void setEditHtmlAttribute(HttpServletRequest request, String parent, String node);
	
	
}
